Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Problem description #43

Merged
merged 7 commits into from
Feb 26, 2024
Merged

feat: Problem description #43

merged 7 commits into from
Feb 26, 2024

Conversation

ykit00
Copy link
Collaborator

@ykit00 ykit00 commented Feb 21, 2024

Close #42

モーダルで問題の解説を表示できるようにしました。
image

Self Check

  • I've confirmed All checks have passed on PR page. (You may leave this box unchecked due to long workflows.)
    • PR title follows Angular's commit message format.
      • PR title doesn't have WIP:.
    • All tests are passed.
      • Test command (e.g., yarn test) is passed.
      • Lint command (e.g., yarn lint) is passed.
  • I've reviewed my changes on PR's diff view.

@ykit00 ykit00 changed the title [WIP] ユーザーは問題の解説を閲覧できる feat: Problem description Feb 26, 2024
@ykit00 ykit00 marked this pull request as ready for review February 26, 2024 06:40
@ykit00 ykit00 requested a review from Tatehito February 26, 2024 06:40
@@ -90,7 +96,10 @@ export const CheckpointProblem: React.FC<CheckpointProblemProps> = ({
</Box>
</VStack>
<VStack align="end" minW="50%" overflow="hidden">
<Button colorScheme="gray">解説</Button>
<Button colorScheme="gray" onClick={onOpen}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExecutionResultProblem.tsx と同じように、CheckpointProblem.tsxやStepProblem.tsxにも {explanation && ( ... を入れた方が良いかも?

selectedLanguageId,
setBeforeCheckPointLine,
setCurrentCheckPointLine,
setStep,
}) => {
const turtleGraphicsRef = useRef<TurtleGraphicsHandle>(null);

const { isOpen, onClose, onOpen } = useDisclosure();
const explanation = getExplanation(programId, selectedLanguageId);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

些細なことですが、page.tsxで const explanation = getExplanation(programId, selectedLanguageId); をして各コンポーネントに渡すようにすれば getExplanation の記述箇所が page.tsxだけで済むかもと思ったり?どちらが良いでしょうか...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

たしかに親のほうでやったほうがよさそうですね!

@ykit00 ykit00 requested a review from Tatehito February 26, 2024 07:27
Copy link
Collaborator

@Tatehito Tatehito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ykit00 ykit00 merged commit 6296ff3 into main Feb 26, 2024
5 checks passed
@ykit00 ykit00 deleted the feature/42/problem-description branch February 26, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ユーザーは問題の解説を閲覧できる
2 participants